from typing import NamedTuple


tup = (1,'2saaa',3,4,5)

# 解构赋值
bat_id,mart_name,*_rest = tup

print("bat_id",bat_id)
print("mart_name",mart_name)
print("rest",_rest)


class MyTuple(NamedTuple):
    bat_id: int
    mart_name: str
    rest1: int
    rest2: int
    rest3: int


my_tup = MyTuple(*tup)

print("bat_id", my_tup.bat_id)